/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.bean.chart;

import com.bean.chart.iterfaces.AbstractChart;
import java.awt.Color;
import java.awt.Graphics;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import java.io.Serializable;

/**
 *
 * @author sammael
 */
public class Chart extends AbstractChart implements Serializable {
    
    public static final String PROP_SAMPLE_PROPERTY = "sampleProperty";
    
    private PropertyChangeSupport propertySupport;// = new PropertyChangeSupport(this);
    
    public Chart() {
        propertySupport = new PropertyChangeSupport(this);
    }
    
    @Override
    public void paintComponent(Graphics g) {
        g.setColor(this.getGridColor());
        g.drawRect(10,10,10,10);
        
    }

    @Override
    protected void paintGrid(Graphics g) {
        //throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    protected void paintLine(Graphics g) {
        //throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    protected void paintDot(Graphics g) {
        //throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    protected void propertyChange(String property, double oldval, double newVal) {
        propertySupport.firePropertyChange(property, oldval, newVal);
    }

    @Override
    protected void propertyChange(String property, boolean oldval, boolean newVal) {
        propertySupport.firePropertyChange(property, oldval, newVal);
    }

    @Override
    protected void propertyChange(String property, int oldval, int newVal) {
        propertySupport.firePropertyChange(property, oldval, newVal);
    }

    @Override
    protected void propertyChange(String property, Object oldval, Object newVal) {
        propertySupport.firePropertyChange(property, oldval, newVal);
    }

}
